<?php



    if(empty($_GET['p'])){
        $_GET['p'] = 1;
    }

    $cur_page = $_GET['p'];
    $per_page = 2;
    $show_page = 5;
    $offset = ($cur_page - 1)*$per_page;

    include_once(LIB_PATH.'pages.php');
    $pages = getPages($cur_page,$per_page,$show_page,'admin',$link);

    $sql = "select * from `admin` limit $offset,$per_page";
    $result = mysqli_query($link,$sql );

    //用while语句把结果集里的数组逐一存到一个二维数组当中
    while ($arr = mysqli_fetch_assoc($result)){
        $data[] = $arr;
    }
    //print_r($data);die;






?>